import plugin from '../../lib/plugins/plugin.js'
import fetch from 'node-fetch'
import { segment } from "oicq";


export class tbmjx extends plugin {
  constructor () {
    super({
      /** 功能名称 */
      name: '随机图',
      /** 功能描述 */
      dsc: '随即图',
      /** https://oicqjs.github.io/oicq/#events */
      event: 'message',
      /** 优先级，数字越小等级越高 */
      priority: 5000,
      rule: [
        {
          /** 命令正则匹配 */
          reg: '随机图',
          /** 执行方法 */
          fnc: 'setu'
        }
      ]
    })
  }


  async setu (e) {
logger.info('[用户命令]', e.msg)
let url = 'https://iw233.cn/API/Random.php'
await this.reply(segment.image(url),true,{recallMsg:10})
}
}